from flask import Blueprint, render_template, request

user_bp = Blueprint('user', __name__)


@user_bp.route('/login', methods=['GET', 'POST'])
def login():
    if request.method == 'POST':
        return 'i am in post'
    else:
        return render_template('login.html')


@user_bp.route('/')
def index():
    return render_template('index.html')


@user_bp.route('/register', methods=['GET', 'POST'])
def register():
    if request.method == 'POST':
        username = request.form['username']
        password = request.form['password']
        print(username)
        print(password)
        return password
    else:
        return render_template('register.html')
